﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SelectUser.aspx.cs" Inherits="Meeting.Web.Admin.SelectBase.SelectUser" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>人员选择</title>
    <script type="text/javascript" src="../../Scripts/jquery-1.8.2.min.js"></script>
    <!--树样式-->
    <link rel="stylesheet" href="../../Css/zTreeStyle/zTreeStyle.css" type="text/css" />
    <script type="text/javascript" src="../../Scripts/jquery.ztree.core-3.5.min.js"></script>
      
    <script type="text/javascript" src="../../Scripts/artDialog4.1.6/artDialog.js?skin=blue"></script>
    <script type="text/javascript" src="../../Scripts/artDialog4.1.6/plugins/iframeTools.js"></script>
    <script type="text/javascript">
        $(function () {
            //部门树初始化
            //1.设置
            var setting = { 
                data: {
                    simpleData: {
                        enable: true,
                        idKey: "id",
                        pIdKey: "pId",
                        rootPId: "0"
                    }
                },
                callback: { onClick: onClick }
            };
            //2.事件
            function onClick(event, treeId, treeNode) {
                if (treeNode.id.substring(0, 1) != "E") {
                    alert('请选择主持人！');
                    return;
                }
                art.dialog.data('id', treeNode.id);
                art.dialog.data('name', treeNode.name);
                art.dialog.close();
            }
            //3.初始化代码
            $.ajax({
                type: "POST",
                url: "SelectOperation.ashx?method=GetDeptEmploy",
                dataType: "json",
                success: function (data, textStatus) {
                    zTree = $.fn.zTree.init($("#treeMain"), setting, data);
                    zTree.expandAll(true);

                },
                error: function (XMLHttpRequest, textStatus, errorThrown) {
                    //alert(XMLHttpRequest.status);
                    // alert(textStatus);
                    //alert(errorThrown);
                }
            });
        });
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <ul id="treeMain" class="ztree">
        </ul>
    </div>
    </form>
</body>
</html>
